cmake_minimum_required(VERSION 3.0)
project(elf_parser C CXX)
include_directories(${PROJECT_SOURCE_DIR}/include)
set(CMAKE_C_FLAGS "-std=c99 -Wall")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
add_library(buf2str STATIC ${PROJECT_SOURCE_DIR}/src/myelf.c)
add_executable(test1 ${PROJECT_SOURCE_DIR}/test/test1.c)
add_executable(test2 ${PROJECT_SOURCE_DIR}/test/test2.c)
add_executable(test3 ${PROJECT_SOURCE_DIR}/test/test3.c)
target_link_libraries(test1 PRIVATE buf2str)
target_link_libraries(test2 PRIVATE buf2str)
target_link_libraries(test3 PRIVATE buf2str)